<template>
  <div>
    恭喜你~~~
    <h1></h1>
  </div>
</template>

<script>
export default {
  //路由拦截器组件内部拦截
  beforeRouteEnter(to, form, next) {
    //验证token
    if (localStorage.getItem('token')) { //如果有token就放行
      next()
    } else next('/login')
  }
}
</script>

<style>
</style>
